//
//  CollectionViewCell.m
//  自适应瀑布流
//
//  Created by dllo on 16/3/10.
//  Copyright © 2016年 dllo. All rights reserved.
//

#define Width self.contentView.frame.size.width
#define Height self.contentView.frame.size.height

#import "CollectionViewCell.h"

@interface CollectionViewCell ()


@end

@implementation CollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if(self){
        [self createView];
    }
    return self;
}
#pragma mark 创建视图
- (void)createView{
    // 视频封面的图片
    self.picImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.picImageView];
}


#pragma mark 设置尺寸
// 防止重用之后,还是上一次出现的尺寸,所以为了能显示最新的尺寸,需要重新进行布局
- (void)layoutSubviews{
    [super layoutSubviews];
    self.picImageView.frame = self.contentView.frame;
}

@end
